<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
						<link rel="stylesheet" href="__PUBLIC__/css/ul.css" />
		
	</head>
	<body >	
	<h6><kbd>&nbsp;导航列表&nbsp;</kbd></h6>
	<a href="{:U(MODULE_NAME.'/Navigate/create')}" class="btn btn-info btn-sm">新增导航</a>
				<a href="" class="btn btn-info btn-sm">排序</a>
			<div id="Navigate">
				
			<ul class="headUL">
						<li>导航名称</li>
						<li>导航地址</li>
						<li>排序</li>
						<li>类型</li>
						<li>操作</li>
			</ul>
			<foreach name="navs" item="v">
				<ul class="bodyYL">
						<li><i class="glyphicon glyphicon-chevron-down pull-left"></i>{$v.title}</li>
						<li>{$v.href}</li>
						<li><kbd>{$v.orders}</kbd></li>
					<li>{$v.navtype}</li>
						<li>
							<div class="btn-group btn-group-xs">
								<a href="{:U(MODULE_NAME.'/Navigate/edit',array(id=>$v['id']))}" class="btn btn-success">编辑</a>
							<if condition="$v.ishide eq y">
					<a href="{:U(MODULE_NAME.'/Navigate/update_IShide',array(id=>$v['id'],ishide=>n))}" title="当前为隐藏,点击显示" class="btn btn-info btn-xs">点击显示</a>
					<else />
					<a href="{:U(MODULE_NAME.'/Navigate/update_IShide',array(id=>$v['id'],ishide=>y))}" title="当前为显示,点击隐藏"  class="btn btn-danger  btn-xs">点击隐藏</a>
					</if>
						<a onclick="DeleteNavigate({$v.id},this)" url="{:U(MODULE_NAME.'/Navigate/delete',array(id=>$v['id']))}" href="javascript:void(0)" data-toggle="modal" class="btn btn-warning">删除</a>								
							</div>
						</li>
						<foreach name="v.child" item="v2">
							<ul>
								<li>{$v2.title}</li>
								<li>{$v2.href}</li>
						<li><kbd>{$v2.orders}</kbd></li>

								<li>{$v2.navtype}</li>

								<li>
							<div class="btn-group btn-group-xs">
								<a href="{:U(MODULE_NAME.'/Navigate/edit',array(id=>$v2['id']))}" class="btn btn-success">编辑</a>
									<if condition="$v2.ishide eq y">
					<a href="{:U(MODULE_NAME.'/Navigate/update_IShide',array(id=>$v2['id'],ishide=>n))}" title="当前为隐藏,点击显示" class="btn btn-info btn-xs">点击显示</a>
					<else />
					<a href="{:U(MODULE_NAME.'/Navigate/update_IShide',array(id=>$v2['id'],ishide=>y))}" title="当前为显示,点击隐藏"  class="btn btn-danger  btn-xs">点击隐藏</a>
					</if>
								<a onclick="DeleteNavigate({$v.id},this)" url="{:U(MODULE_NAME.'/Navigate/delete',array(id=>$v2['id']))}" href="javascript:void(0)" data-toggle="modal" class="btn btn-warning">删除</a>								
							</div>
								</li>
						</ul>
						
					</foreach>
				</ul>
			</foreach>
			</div>
	</body>		

	<script>
		$('.bodyYL .glyphicon').click(function()
		{
			$(this).parents('ul').find('ul').fadeToggle();
		})
		function DeleteNavigate(id,sender)
		{
			$('.btnDeleteNavigate').attr('href','');
			$('#deleteNavigate').modal('show').on('shown.bs.modal',function()
			{
				$('.btnDeleteNavigate').attr('href',$(sender).attr('url'));
			});
		}   
	</script>

</html>
